<template>
	<view class="P_2">
		<view class="bg_fff B_radius_5 P_2">
			<view class="PTB_2" style="display: flex;align-items: flex-end;">
				请输入您的反馈
				
			</view>
			<view class="PTB_2 line_bom">
				<textarea v-model="word" placeholder="请输入..." />
			</view>
		</view>
		
		<view @click="submit" class="pub_bg color_fff flex_rowC MT_4 PTB_2 B_radius_5">
			确定
		</view>
		
		<view class="PTB_2 font_weight_bold">
			反馈记录
		</view>
		<view class="bg_fff B_radius_5 P_2 MT_2" v-for="(item,i) in list" :key='i'>
			<view class="">
				{{item.content}}
			</view>
			<view class="PT_2 color_gray">
				回复：{{item.replay?item.replay:'暂无回复'}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info:{},
				word:'',
				list:[]
			}
		},
		onLoad() {
			// this.getInfo();
			this.getList()
		},
		onShow() {
			this.getList()
		},
		methods: {
			submit(){
				let _this = this;
				this.$req('index/addFeedback',{content:_this.word},function(res){
					_this.toast('操作成功')
					_this.word = '';
					_this.getList()
				})
			},
			getList(){
				let _this = this;
				this.$req('index/feedbackIndex',{},function(res){
					console.log(res)
					_this.list = res.data
				})
			}
			// getInfo(){
			// 	let _this = this;
			// 	this.$req('index/page',{type:3},function(res){
			// 		_this.info = res.data;
			// 	})
			// }
		}
	}
</script>

<style>

</style>
